using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityUtilities;

public class CantMoveBuff : Buff
{
    private Countdown Duration;
    private void Awake()
    {
        Duration = new Countdown(false, base.duration / 1000.0f);
    }

    // Start is called before the first frame update
    void Start()
    {
        gameObject.GetComponentInParent<state>().isMovable = false;

    }

    // Update is called once per frame
    void Update()
    {
        if (Duration.Progress())
        {
            gameObject.GetComponentInParent<state>().isMovable = true;
            Destroy(this.gameObject);
        }

    }
}
